package com.sky.mapper;

import com.sky.entity.ShoppingCart;
import org.apache.ibatis.annotations.Mapper;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;

/**
 * @Description:
 * @author: nianqiang
 * @Version: V1.0
 */
@Mapper
public interface CartMapper {


		/**
		 * 根据菜品id\套餐id\口味 查询我的购物车数据
		 * @param shoppingCart
		 * @return
		 */
		public List<ShoppingCart> findByQuery(ShoppingCart shoppingCart);

		/**
		 * 保存购物车
		 * @param shoppingCart
		 */
		public void insert(ShoppingCart shoppingCart);

		/**
		 * 根据id修改购物车菜品数量
		 * @param shoppingCart
		 */
		public void updateNumberById(ShoppingCart shoppingCart);


		public void deleteByUserId(Long userId);


}
